/*
 * @Description: 
 * @Author: Sang Hao
 * @Date: 2021-09-15 17:11:42
 * @LastEditTime: 2021-10-27 11:40:25
 * @LastEditors: Sang Hao
 */

#ifndef LIDAR_SLAM_PUBLISHER_KEY_FRAMES_PUBLISHER_HPP_
#define LIDAR_SLAM_PUBLISHER_KEY_FRAMES_PUBLISHER_HPP_

#include <string>
#include <deque>
#include <ros/ros.h>

#include "lidar_slam/sensor_data/key_frame.hpp"

namespace lidar_slam {
class KeyFramesPublisher {
private:
	/* data */
	ros::NodeHandle nh_;
	ros::Publisher publisher_;
	std::string frame_id_ = "";

public:
	KeyFramesPublisher(ros::NodeHandle& nh,
						std::string topic_name,
						std::string frame_id,
						int buff_size);
	KeyFramesPublisher() = default;
	void Publish(const std::deque<KeyFrame>& key_frames);
	bool HasSubscribers();
};
}

#endif